package com.juzipi.demo.config;


import com.auth0.jwt.exceptions.JWTDecodeException;
import com.juzipi.demo.tools.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionAdvice {



    @ExceptionHandler(JWTDecodeException.class)
    public Result handle401(JWTDecodeException e){
        return Result.fail("token验证失败",401);
    }




}
